package com.hp.tiger.concurrent.classloader.chapter4;

import java.lang.reflect.Method;

/**
 * @author XavierDong
 **/
public class ClassloaderTest {


    public static void main(String[] args) throws Exception {
        DecryptClassloader myClassLoader = new DecryptClassloader();
        myClassLoader.setDir("/Users/xavierdong/Documents/classloader2");
        Class<?> aClass = myClassLoader.loadClass("com.hp.tiger.concurrent.classloader.chapter3.MyObject");
        System.out.println(aClass);
        Object object = aClass.newInstance();
        Method method = aClass.getMethod("hello", new Class<?>[]{});
        Object invoke = method.invoke(object, new Object[]{});
        System.out.println(invoke);
    }
}
